<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePresentCardsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('present_cards', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->comment('卡名称');
            $table->string('content')->comment('卡描述');
            $table->string('home_image')->comment('首页图片');
            $table->string('head_image')->comment('详情图片');
            $table->string('log_image')->comment('记录图片');
            $table->string('font_color')->default('')->comment('字体颜色');
            $table->tinyInteger('sort')->default(0)->comment('排序');
            $table->timestamps();
        });
        DB::statement("ALTER TABLE `present_cards` comment '礼品卡类型表';");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('present_cards');
    }
}
